package com.xxzuibang.day5;

public class Test4 {
    public static void main(String[] args) {
        int i=1;//循环变量初始化
        do{
            System.out.print(i+"\t");
            i++;
        }while (i<=100);
        System.out.println("-------------------------");
        Demo2();
        System.out.println("--------------------------");
        Demo3();

    }

    private static void Demo3() {
        int k=1;
        int count=0;
        do{
            if(k%5==0&&k%3!=0){
                count++;
            }
            k++;
        }while (k<=200);
        System.out.println("个数为："+count);
    }

    private static void Demo2() {
        int sum=0;
        int j=0;
        do{
            sum=sum+j;
            j++;
        }while (j<=100);
        System.out.println(sum);
    }
}
